//
//  HBQHeaderModel.m
//  HelloBeeQuick
//
//  Created by LiYiLin on 16/8/20.
//  Copyright © 2016年 LiYiLin. All rights reserved.
//

#import "HBQHeaderModel.h"

#pragma mark - 轮播器部分 -
@implementation HBQHeaderModel

+ (instancetype)initWithDic:(NSDictionary *)dic {

    HBQHeaderModel * model = [[HBQHeaderModel alloc] init];
    [model setValuesForKeysWithDictionary:dic];
    return model;
}

+ (NSArray *)dataWithArray:(NSArray *)dtoArray {
    
    //创建可变数组保存数据,设置可变数组的容量
    NSMutableArray * mutable = [NSMutableArray arrayWithCapacity:5];
    for (NSDictionary *dic in dtoArray) {
        [mutable addObject:[HBQHeaderModel initWithDic:dic]];
    }
    return mutable;
}

@end

/*  ============================================================  */

#pragma mark - 按钮部分 -
@implementation HBQHomeIconsModel

+ (instancetype)initWithDic:(NSDictionary *)dic {
    
    HBQHomeIconsModel * model = [[HBQHomeIconsModel alloc] init];
    [model setValuesForKeysWithDictionary:dic];
    return model;
}

+ (NSArray *)dataWithArray:(NSArray *)dtoArray {
    
    //创建可变数组保存数据,设置可变数组的容量
    NSMutableArray * mutable = [NSMutableArray arrayWithCapacity:5];
    for (NSDictionary *dic in dtoArray) {
        [mutable addObject:[HBQHomeIconsModel initWithDic:dic]];
    }
    return mutable;
}


@end

/*  ============================================================  */

#pragma mark - 新特惠部分 -
@implementation HBQActivitesModel

+ (instancetype)initWithDic:(NSDictionary *)dic {
    
    HBQActivitesModel * model = [[HBQActivitesModel alloc] init];
    [model setValuesForKeysWithDictionary:dic];
    return model;
}

+ (NSArray *)dataWithArray:(NSArray *)dtoArray {

    //创建可变数组保存数据,设置可变数组的容量
    NSMutableArray * mutable = [NSMutableArray arrayWithCapacity:5];
    for (NSDictionary *dic in dtoArray) {
        [mutable addObject:[HBQActivitesModel initWithDic:dic]];
    }
    return mutable;
}

@end




